package main
import(
	"fmt"
)

//211216划水学go 基本数据类型和string的转换
func main(){

	var num1 int = 99
	var num2 float64 = 23.456
	var b bool = true
	var myChar byte = 'h'
	var str string //空的str

	//使用第一种方式转换
	str=fmt.Sprintf("%d", num1)
	fmt.Printf("str type %T str=%q\n", str, str)

	str=fmt.Sprintf("%f", num2)
	fmt.Printf("str type %T str=%q\n", str, str)

	str=fmt.Sprintf("%t", b)
	fmt.Printf("str type %T str=%q\n", str, str)

	str=fmt.Sprintf("%c", myChar)
	fmt.Printf("str type %T str=%q\n", str, str)



}